<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ESP32-S3 SSE 监听器</title>
    <!-- 引入样式文件 -->
    <link rel="stylesheet" href="style.css">
</head>
<body>

    <div class="container">
        <h1>ESP32-S3 SSE 监听器</h1>

        <div class="controls">
            <label for="esp-ip">ESP32 IP 地址:</label>
            <input type="text" id="esp-ip" placeholder="例如: 192.168.1.100" value="192.168.1.100">
            <button id="connect-btn">连接</button>
        </div>

        <div class="status-panel">
            <strong>状态:</strong>
            <span id="status-text" class="status-disconnected">未连接</span>
        </div>

        <div class="log-panel">
            <h2>事件日志</h2>
            <div id="events-log">
                <!-- SSE 事件将在这里显示 -->
            </div>
        </div>
    </div>

    <!-- 引入脚本文件 -->
    <script src="script.js"></script>

</body>
</html>